home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
tex
/
tsfilt21.zip
/
TSFILT.NWS
< prev
next >
Wrap
Text File
|
1994-02-11
|
9KB
|
177 lines
News on the TSFILT text file filter package in reverse order
============================================================
University of Vaasa, Finland, SUN SPARCstation IPX garbo.uwasa.fi
has a large collection of PD and shareware PC programs available by
anonymous ftp and mail server. The file /pc/ts/0news-ts contains
news about the TS-programs in the /pc/ts directory (in reverse
order). This text, which you now have, is an extract from the
0news-ts file and UseNet news.
..................................................................
Prof. Timo Salmi Co-moderator of comp.archives.msdos.announce
Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
Faculty of Accounting & Industrial Management; University of Vaasa
Internet: ts@uwasa.fi BBS +(358)-61-3170972; FIN-65101, Finland
..................................................................
Fri 11-Feb-94: If anything can go wrong, it will. I recently
released updates of my filters, but unfortunately several bugs were
still found. In particular my thanks to Dave Kapalko
medik@attme.att.com Hence update garbo.uwasa.fi:/pc/ts/tsfilt21.zip.
- Corrected the /k keep date option. It did not work at all in
LOGFILT "Filters backspaces from logfiles"
- It refused process backspaces. Corrected that.
Sun 23-Jan-94: I have updated my filters for text files to be
garbo.uwasa.fi:/pc/ts/tsfilt20.zip by adding a /f switch (force
overwrite if source = destination) to the following individual
programs. My thanks to Antti Virjo avirjo@tays.fi for the
suggestion.
LOGFILT.EXE "Filters backspaces from logfiles"
TOASC.EXE "8bit ibm to Scandinavian 7 ascii"
TOASCI.EXE "8bit ibm to International 7ascii"
TOIBM.EXE "7 ascii to Scandinavian 8bit ibm"
The first of these has become somewhat obsolete in the sense that
modems now tend to be error-correcting.
Wed 29-Jan-92: I have updated to garbo.uwasa.fi:/pc/ts/tsfilt19.zip.
It is a collection of filters for text files. Among others it
includes programs for converting text files from 8-bit ascii to
7-bit ascii with Scandinavian conventions. The programs are
TOASC.EXE and TOASCI.EXE. There is also a Scandinavian conversion
TOIBM.EXE from 7-bit ascii to 8-bit ascii. The fourth update is
LOGFILT.EXE to filter noise from telecommunication log files. These
programs have now the following enhancements:
- A new optional keep switch (/k) to make the date/time stamp of the
destination file the same as that of the source text file.
- To allow the source text file and the destination file be the
same. In other words the programs can now make the conversion
without forcing you to produce new files with names different from
the original.
- The programs first test whether the source file is a proper text
file with MsDos #13#10 eolns, no special characters (#0..#6, #8,
#11, #14..#25, #28..#31), and no lines exceeding 254 characters in
length. If not the conversion will not be attempted.
Some examples of the current usages:
TOASC MyText.txt /k (ä -> }, ö -> |, etc)
TOASC MyText.txt conv.txt
TOASC MyText con /m
Fri 18-Oct-91: I have updated my filters for converting Unix <-->
MsDos text files. As you know, Unix text files use ascii 10 as eolns
(end of lines), while MsDos text files use the ascii 13 10 pair.
PC2UNIX.EXE and UNIX2PC.EXE filters in the updated
garbo.uwasa.fi:/pc/ts/tsfilt18.arc
can be used to convert the eolns. I have added a /t test switch for
batch programming to both the filters. When the switch is on, the
filters return errorlevel==0 if the file redirected to the filter is
a text file. Else it returns errorlevel==1.
I have added a U2PC.BAT batch which utilizes this feature. The
purpose of the U2PC.BAT batch is to convert the original Unix text
file into an MsDos text file, and preserve the date/time stamp of
the file in converting it. To use it you'll need my TOUCH.EXE
program from garbo.uwaswa.fi:/pc/ts/tsutlb19.arc (note that earlier
versions won't do). You also must have at least MsDos version 3.30.
In fact I wrote this batch for my own needs, but decided to make
it publicly available, too. The background is this. I have been
transferring also text files from my hosts (chyde and garbo) via a
modem connection to my home PC. To make the transfer more efficient
I have used .arc compression first. This choice is because .arc can
correctly handle the the Unix <-> PC eoln conversion, while the
current .zip and .zoo do not have this feature. However, because of
its better efficiency I want to use .zip packing to transfer the
text files. But I also want to preserve the original date/time
stamps of the files when I do the eoln conversion on my PC after
unpacking the relevant .zip file, so I wrote this batch for this
purpose.
Furthermore, there is a new UNZIPTXT.BAT batch which unzips a zip
file and converts the found Unix text files into MsDos text files
while preserving the date/time stamps intact.
Incidentally, if you find U2PC.BAT and UNZIPTXT.BAT instructive,
there is plenty more in /pc/ts/tsbat27.arc.
Tue 21-May-91: I have programmed three sets of various MsDos
filters, and now updated the first set to be /pc/ts/tsfile17.arc. In
general, the true (Unix-type) filters are written to rely on pipes
and/or redirection. A common practical problem with these filters is
that if you type the filter name all by itself, you appear to be
stuck. In actual fact the filter is just expecting input from the
console. The remedy to this problem is to program the filter in a
way that it senses whether it is getting piped (or redirected)
input. If it is not, then instead of filtering, the call to the
filter should give the instructions. As an example consider the
filter UNIX2PC which converts Unix eolns (end of lines) to PC eolns
(useful if you transfer Unix text files to your PC). The common
syntax using pipe and redirection is
TYPE UNIX.TXT | UNIX2PC > PC.TXT
What I have done is to reprogram UNIX2PC in such a way that if you
write alone
UNIX2PC
this call will give you the instructions, instead of waiting for
input from the console to the filter. Technically speaking this is
achieved by a program code which detects where the input comes from,
and acts accordingly. The idea for using this redirection detection
code comes from an article in the PC Magazine, April 16, 1991, p.
374. (This does not work for MsDos versions earlier than 2.00).
I have included this feature in the following of the filters in
the updated tsfilt17.arc package:
PC2UNIX.EXE PC text eolns to Unix eolns
UNIX2PC.EXE Unix text eolns to PC eolns
ASC2IBM.EXE 7 ascii to Scandinavian 8bit ibm
IBM2ASC.EXE 8bit ibm to Scandinavian 7 ascii
The input and output of also ASC2IBM.EXE and IBM2ASC.EXE has not
been buffered for faster disk access (in other words these filters
kind of have a cache of their own).
The following edited extract from my Frequently Asked Questions
is also of interest here:
23. *****
Q: Where can I find compress for MsDos to handle .Z files?
A: Unix has compress, uncompress and zcat programs to pack or
unpack files which are given the .Z extension. These files can also
be handled under MsDos using for example /pc/unix/comp430d.zip,
which is available from anonymous FTP sites like garbo.uwasa.fi,
SIMTEL20, etc.
There is one useful trick if you uncompress on MsDos such text
files that have been made on Unix with compress. Unix and MsDos have
different eolns (end of lines). You can extract a Unix compressed
text file as follows
comp430d -d -c YourZFile | unix2pc > YourOutputFile
where unix2pc.exe is taken from /pc/ts/tsfilt17.arc (or whatever is
the current version number).
28-Aug-89: TSFILT16.ARC has the following enhancements:
- ASC2IBM.EXE and IBM2ASC.EXE have been added. These are filters for
Scandinavian conversions of 8-bit <--> 7-bit characters. They
perform a similar function as TOIBM.EXE and TOASC.EXE. The
difference is that the latter are programs taking the